# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Thore Bödecker <foxxx0@archlinux.org>
# Contributor: Matmas <matmas@matmas.net>
# Contributor: Thomas Gubler <thomasgubler@gmail.com>
# Contributor: Daniel YC Lin <dlin.tw at gmail>
# Contributor: Florian Bruhin <archlinux.org@the-compiler.org>

pkgname=python-websocket-client
pkgver=1.5.1
pkgrel=2
pkgdesc="WebSocket client library for Python"
arch=('any')
url="https://github.com/websocket-client/websocket-client"
license=('LGPL')
depends=('python')
makedepends=('python-setuptools')
checkdepends=('python-pytest')
source=("https://pypi.io/packages/source/w/websocket-client/websocket-client-$pkgver.tar.gz")
sha512sums=('9fce0c8de64e051b151c40a295a7f722ed7f95d19bd92ffd5cd9c64962821024e79b70d18ca7e30ca8b8707ba86be041134f13d7e2cf7bc4a4539eb22ba60895')

build() {
  cd websocket-client-$pkgver
  python setup.py build
}

check() {
  cd websocket-client-$pkgver
  pytest
}

package() {
  cd websocket-client-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}

# vim:set ts=2 sw=2 ft=sh et:
